Unable to read a file

string OBJFilename = "V:\\ObjMod.txt" // file with OBJ... in it
Stream input = read OBJFilename

When I run this, I get this message:
-R-E-DXL:<Line:2> cannot open file(V:\ObjMod.txt) for reading(Invalid Argument)

Yet, I have a similar read in another script that works!

Any suggestions?

Thank you

The file is not open in another editor, and is valid!
Gedinfo - Fri Oct 29 09:33:15 EDT 2010

Re: Unable to read a file
llandale - Fri Oct 29 13:13:39 EDT 2010

Try
bool canOpenFile(string pathname, false)

You should also trap your read command:
noError()
Stream input = read(OBJFilename)
string ErrMess = lastError()
if (null input or !null ErrMess)
{ whatever, ack ("Cannot open file " ErrMess)
}

I'm getting that error when the file doesn't exist, and not getting it when it does. Are you SURE this PC can see the 'v' drive?

  • Louie